<script>
    Scarab.setOrderId('<?php echo Mage::getSingleton('checkout/session')->getLastOrderId(); ?>');
    
<?php $sorder = Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId()); 
$sitems = $sorder->getAllItems();
foreach ($sitems as $sitem){
$product = $sitem->getProduct();
if ($sitem[row_total_incl_tax] != "") {
$price = $sitem[row_total_incl_tax];
echo "Scarab.checkOut('".$sitem->getProductId()."', ".($sitem->getQtyOrdered()*1).", ".$price.");";
}
} ?>
</script>